//
//  PresentTableViewCell.m
//  A_GOGO
//
//  Created by Liuiu on 16/1/21.
//  Copyright © 2016年 www.lanou3g.com. All rights reserved.
//

#import "PresentTableViewCell.h"
#import "UIColor+Wonderful.h"

@implementation PresentTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.contentView.backgroundColor = [UIColor gainsboroColor];
        
           _xian =[[UILabel alloc]init];
        _xian.backgroundColor =[UIColor darkGrayColor];
        _xian.alpha = 0.4;
        [self.contentView addSubview:_xian];
        [_xian release];
        
        _background =[[UIImageView alloc]init];
        [self.contentView addSubview:_background];
        _background.image = [UIImage imageNamed:@"white"];
        [_background release];
        
        _imagea =[[UIImageView alloc]init];
        [self.background addSubview:_imagea];
        [_imagea release];
        
        _gname = [[UILabel alloc]init];
        _gname.font = [UIFont fontWithName:@"Helvetica-Bold" size:17];
        _gname.textAlignment = NSTextAlignmentCenter;
        [self.background addSubview:_gname];
        [_gname release];
        
        _title = [[UILabel alloc]init];
        _title.textColor = [UIColor lightGrayColor];
        _title.font = [UIFont systemFontOfSize:14];
        [self.background addSubview:_title];
        [_title release];
        
        _sheng = [[UILabel alloc]init];
        _sheng.text =@"剩余:";
        _sheng.font =[UIFont systemFontOfSize:14];
        _sheng.textColor = [UIColor lightGrayColor];
        [self.background addSubview:_sheng];
        [_sheng release];
        
        _last =[[UILabel alloc]init];
        _last.textColor = [UIColor doderBlue];
        _last.font = [UIFont systemFontOfSize:12];
        [self.background addSubview:_last];
        [_last release];
        
        _gang = [[UILabel alloc]init];
        _gang.text = @"/";
        _gang.textColor = [UIColor doderBlue];
        [self.background addSubview:_gang];
        [_gang release];
        
        _card = [[UILabel alloc]init];
        _card.textColor = [UIColor doderBlue];
        _card.font = [UIFont systemFontOfSize:12];
        [self.background addSubview:_card];
        [_card release];
        
        _receive = [[UILabel alloc]init];
        
        _receive.font =[UIFont systemFontOfSize:13];
        [self.background addSubview:_receive];
        [_receive release];
        
     
    }
    return self;
}

//布局
- (void)layoutSubviews
{
    
    [super layoutSubviews];
    _background.frame = CGRectMake(10, 20, self.contentView.frame.size.width - 20, 120);
    _imagea.frame = CGRectMake( 10, 10, 100, 100);
    _gname.frame = CGRectMake(100, 8, 100, 30);
    _title.frame = CGRectMake(115, 45, 120, 25);
    _sheng.frame = CGRectMake(115, 75, 60, 25);
    _last.frame = CGRectMake(160, 78, 40, 20);
    _gang.frame = CGRectMake(190, 84, 10, 10);
    _card.frame = CGRectMake(205, 78, 40, 20);
    _xian.frame = CGRectMake(18, 0, 1, self.contentView.frame.size.height);
    _receive.frame = CGRectMake(290, 45, 60, 25);
}





@end
